package com.xuelang.pipeline.app.project.converter;

import com.xuelang.pipeline.client.project.dto.ProjectDTO;
import com.xuelang.pipeline.client.project.dto.ProjectTypeDTO;
import com.xuelang.pipeline.domain.project.Project;
import com.xuelang.pipeline.domain.project.ProjectType;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * <p>项目实体至DTO转换器</p>
 *
 * @author : yixin.lys
 * @date : 2024-09-03 11:09
 **/
@Mapper
public interface ProjectTypeToDTOConverter {

    ProjectTypeToDTOConverter INSTANCE = Mappers.getMapper(ProjectTypeToDTOConverter.class);

    /**
     * 转为DTO
     * @param entity
     * @return
     */
    ProjectTypeDTO toDTO(ProjectType entity);

    /**
     *
     * @param dto
     * @return
     */
    ProjectType fromDTO(ProjectTypeDTO dto);
}
